<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:p="http://primefaces.org/ui"
	xmlns:rich="http://richfaces.org/rich">

<h:head>
	<title>#{msg.tituloPlantilla}</title>
	<link href="#{request.contextPath}/resources/css/estilo.css"
		rel="stylesheet" type="text/css" />
</h:head>

<body>
	<f:view locale="#{idiomaBean.locale}">
		<div id="main"
			style="background-color: #F4F4F4; border: 0; width: 900px; min-height: 900px; margin-left: auto; margin-right: auto; margin-top: 20px; margin-bottom: 10px;">
			<div id="header"
				style="background-color: #F4F4F4; height: 100px; width: 100%;">
				<h:form>
					<h:commandLink action="irInicioSinLogueo"
						rendered="#{!usuarioBean.logueado}">
						<p:graphicImage value="/resources/images/logo.png"
							alt="MetaServer" />
					</h:commandLink>
				</h:form>
				<h:form>
					<h:commandLink action="irInicioAdmin" rendered="#{usuarioBean.logueado}">
						<h:graphicImage value="/resources/images/logo.png"
							alt="MetaServer" />
					</h:commandLink>
				</h:form>
			</div>
			<div id="menu"
				style="background-color: #F4F4F4; height: 40px; text-align: right;">
				<ui:insert name="menu">
					<h:panelGroup rendered="#{usuarioBean.logueado}">
						<h:form>
							<table width="900" cellpadding="0" cellspacing="0">
								<tr>
									<td width="600" height="40">
										<table width="600" cellpadding="0" cellspacing="0">
											<tr>
												<td class="tabActivo" width="150" height="40"><h:commandLink
														action="irServidores" value="#{msg.servidores}" /></td>
												<td class="tabInactivo" width="150"><h:commandLink
														action="irUsuarios" value="#{msg.usuarios}" /></td>
												<td class="tabInactivo" width="150"><h:commandLink
														action="irTipos" value="#{msg.tipos}" /></td>
												<td width="150" style="border-bottom: 1px solid #2779AA"></td>														
											</tr>
										</table>
									</td>
									<td width="300" style="border-bottom: 1px solid #2779AA"></td>
								</tr>
							</table>
						</h:form>
					</h:panelGroup>
				</ui:insert>
			</div>
			<div id="idiomas" class="idiomas">
				<h:form>

					<table>
						<tr>
							<td width="700"></td>
							<td width="32" height="32"><p:graphicImage
									value="/resources/images/person.png" alt=""
									rendered="#{usuarioBean.logueado}" style="border:0" /></td>
							<td width="168" height="32" align="left" valign="middle"><h:commandLink
									action="irUsuarioAdmin" value="#{usuarioBean.usuario.email}"
									rendered="#{usuarioBean.logueado}" /></td>
							<td width="40"><h:commandLink action="#{usuarioBean.logout}"
									rendered="#{usuarioBean.logueado}">
									<p:graphicImage value="/resources/images/logout.png"
										alt="Salir" rendered="#{usuarioBean.logueado}"
										style="border:0" />
								</h:commandLink></td>
							<td width="60" align="right"><h:form>
									<h:selectOneMenu value="#{idiomaBean.localeString}"
										required="true" inmediate="true" onchange="submit()"
										styleClass="comboIdioma">
										<f:selectItem itemValue="es" itemLabel="#{msg.espanol}"></f:selectItem>
										<f:selectItem itemValue="en" itemLabel="#{msg.ingles}"></f:selectItem>
									</h:selectOneMenu>
								</h:form>
							</td>
						</tr>
					</table>
				</h:form>
			</div>
			<div id="content" class="content">
				<ui:insert name="content">
				</ui:insert>
			</div>
		</div>
	</f:view>
</body>
</html>